<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class UserRecord_model extends MY_Model{
	public function __construct()
    {
        parent::__construct();
    }
    //获取管理员操作纪律
    public function pm_user_record_ajax_list($where=array()){
        //总数
        $this->db->select('count(id) as counts');
        $this->com_where($where);
        $query=$this->db->get('pm_user_record');
        $counts=$query->row_array();
            //多条
        $page=isset($_REQUEST['page'])?$_REQUEST['page']:1;
        $startRow=$this->pagesize * ($page - 1);
        $this->com_where($where);
        $this->db->limit($this->pagesize,$startRow);
        $this->db->order_by('id desc');
        $query=$this->db->get('pm_user_record');
        $data['list']=$query->result_array();
        $data['pageshow']=$this->pageajax_show($this->pagesize,$counts['counts']);
        return $data;
    }
    //获取管理员信息
    public function pm_user_info($uidarr,$field='*'){
        $this->db->select($field);
        $this->db->where_in('id',$uidarr);
        $query=$this->db->get('pm_user');
        return $query->result_array();
    }
}
?>